<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
    <title>Celibax admin2</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="Content-Style-Type" content="text/css" />
    <meta http-equiv="Content-Language" content="fr" />
    <meta name="description" LANG="en" content="Celibax is an online betting system. It will be possible to bet on anything with your friends.
            It was initially designed to bet on which of your friends would be the first to get laid, but you can also use it for sporting events, life events or whatever you can think of!
            You cannot play real money here, the Celibax money is the Chochoro and the shame of losing!">
            
    <!-- -------------------------------------------------------------------------------------------- -->
    <!-- LIB INCLUDES -->
    <!-- -------------------------------------------------------------------------------------------- -->
    <script type="text/javascript" src="https://www.google.com/jsapi"></script>
    <script type="text/javascript" src="{{ STATIC_URL}}javascript/jquery.min1.7.2.js"></script>
    <script type="text/javascript" src="{{ STATIC_URL}}javascript/extendAjaxForCSRF.js"></script>
    <!-- the following include allow internet explorer to keep the same display than the other browser -->
    <!--[if lt IE 10]>
	    <script type="text/javascript" src="{{ STATIC_URL}}javascript/CSS3PIE.js"></script>
    <![endif]-->


    <!-- -------------------------------------------------------------------------------------------- -->
    <!-- -------------------------------------------------------------------------------------------- -->
    <!-- STYLE AND PAGE STRUCTURE INCLUDES -->
    <!-- -------------------------------------------------------------------------------------------- -->
    <link rel="stylesheet" type="text/css" href="{{ STATIC_URL}}css/structure.css">
    <script language="JavaScript" type="text/javascript" src="{{ STATIC_URL}}javascript/headerStructure.js"></script>
    
    <!-- -------------------------------------------------------------------------------------------- -->
    <!-- Functional includes-->
    <!-- -------------------------------------------------------------------------------------------- -->
    <script type="text/javascript" src="{{ STATIC_URL}}javascript/killAssetButton.js"></script>
 
    <!-- -------------------------------------------------------------------------------------------- -->
    <!-- -------------------------------------------------------------------------------------------- -->
    <!-- INITIALISATION OF THE PAGE -->
    <!-- -------------------------------------------------------------------------------------------- -->
    <script type="text/javascript" src="{{ STATIC_URL}}javascript/submitUtils.js"></script>
    <script type="text/javascript" src="{{ STATIC_URL}}javascript/coreOnLoad.js"></script>
  
</head>

<body>

    {% load argTemplates %}
    
    <!-- create the header-->
    <script language="JavaScript" type="text/javascript">makeHeader(
        'adminMkt',
        4,
        '{{userName}}',
        '{{betroom.name}}',
        {{betroom.roomType}},//room type
        {{betroom.status}},
        '{{STATIC_URL}}'
     );</script>
    <noscript> <p> Activez Javascript pour voir le menu !</p></noscript>

    <div class="section">  <h1>Asset pay and die</h1> </div>
    
    <div class="section">  
        <!-- Pay dividend -->
        <h2>Pay dividend (TO IMPLEMENT)</h2>
        <div align="left">
            This section allows for an asset to pay a dividend:
            For all funds invested in the asset, we compute the MtM associated to this asset and pay a percentage of this to the bank account.
            If the player who holds the fund has not opened a bank account yet, we open it taking 1% from the target MtM percentage associated to his main strategy. This can lead to less than 50% associated to the main strategy.
            <br />
            Paying asset: 
            <select name="payingAssetDropList" id="payingAssetDropList" class="text">
                <option value="paying_asset" size="auto">Pick up paying asset</option>
            </select><br />
            Percentage of the MtM paid to the bank account <input type="text" value="100" style="text-align:right; width:50px;"></textarea>%.<br />
            <input type="submit" class="myRoundCorners" value="pay dividend" onclick="payDividend();" />
        </div>
     </div>
     
     
   <!-- create the waiting div-->
   <script language="JavaScript" type="text/javascript">create_hidden_waiting_div( {{STATIC_URL}} )</script>
   <noscript> <p> Activez Javascript pour voir le menu !</p></noscript>
        
    <!--Kill asset -->
    <div class="section">  
        <h2>Kill asset</h2>
        <div align="left">
            This section allows to kill an asset:
            All the strategies containing the killed asset will see their number of asset associated to it set to zero.
            The new repartition will be calculated based on the the other numbers of actions for the portfolio associated to the main strategy remaining constant.
            The new numbers of shares assoctiated to the fund, can be recomputed to keep the same MtM or be the old numbers minus how many shares of the killed asset we add.
            Doing this will incrase the prices of the asset which are not killed and therefore makes them competitive compared to the bank account.
            THIS ACTION CANNOT BE MANUALLY REVERTED. For this reason it first saves the data base and you may want to clean ./savedRoomFiles first.
            <br />
            asset to kill: 
            <select name="assetToKillDropList" id="assetToKillDropList" class="text">
                <option value="dying_asset" size="auto">Pick up asset to kill</option>
            </select><br />
            <input type="submit" class="myRoundCorners" value="kill asset at constant MtM" onclick="killAssetMtM('{{betroom.name}}');" />
            <input type="submit" class="myRoundCorners" value="kill asset at constant Numbers" onclick="killAssetNumbers('{{betroom.name}}');" />
        </div>
    </div>
    
    <!-- fill the pick lists-->
    <script language="JavaScript" type="text/javascript">fillAssetToKillPickListRequest(true,'{{betroom.name}}')</script>
    <noscript> <p> Activez Javascript pour voir le menu !</p></noscript>
    
        
    <div>
        <script language="JavaScript" type="text/javascript">footer()</script>
    </div>
        
</body>
</html>
